package com.emmmya.ocs.modules.system.serviceImpl;

import com.emmmya.ocs.common.base.BaseDao;
import com.emmmya.ocs.modules.system.dao.UserDao;
import com.emmmya.ocs.modules.system.entity.User;
import com.emmmya.ocs.modules.system.service.LoginService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @description:
 * @author: 咕噜肉IT小店-黑医
 * @createDate: 2020-05-12
 * @version: 1.0
 */
@Slf4j
@Service
@Transactional
public class LoginServiceImpl implements LoginService {

    @Autowired
    UserDao userDao;

    @Override
    public User getUserByUsername(String name) {
        return userDao.findByUsername(name);
    }

    @Override
    public BaseDao<User, Long> getRepository() {
        return userDao;
    }
}
